﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;

namespace MMMaze
{
    public partial class MainPage : UserControl
    {
        public MainPage()
        {
            InitializeComponent();

            sliderX.ValueChanged += new RoutedPropertyChangedEventHandler<double>(sliderX_ValueChanged);
            sliderY.ValueChanged += new RoutedPropertyChangedEventHandler<double>(sliderY_ValueChanged);
            sliderZ.ValueChanged += new RoutedPropertyChangedEventHandler<double>(sliderZ_ValueChanged);

            pnl.Maze = this.cont;
            
        }
        void sliderX_ValueChanged(object sender, RoutedPropertyChangedEventArgs<double> e)
        {
         this.cont.PM.GlobalOffsetX = e.NewValue;
        }
        void sliderY_ValueChanged(object sender, RoutedPropertyChangedEventArgs<double> e)
        {
            this.cont.PM.GlobalOffsetY = e.NewValue;
        }
        void sliderZ_ValueChanged(object sender, RoutedPropertyChangedEventArgs<double> e)
        {
            this.cont. PM.GlobalOffsetZ = e.NewValue;
        }
    }
}
